import Vue from 'vue'
import Router from 'vue-router'
import Index from './pages/Index/Index.vue' 
import Newslist from './pages/News/Newslist.vue'
import Newsinfo from './pages/News/Newsinfo.vue'
import Pic from './pages/Pic/Pic.vue'
import Goods from './pages/Goods/Goods.vue'
import Goodsinfo from './pages/Goods/Goodsinfo.vue'
import button1 from './pages/Index/components/button1.vue'
import button2 from './pages/Index/components/button2.vue'
import Buycar from './pages/Buycar/Buycar.vue'



Vue.use(Router)

export default new Router({
  mode:"history",
  routes: [
    {
      path: '/', 
      name: 'Index',
      component: Index,
      children:[
        {path:"zujian1",component:button1},
        {path:"zujian2",component:button2}
      ]
    },{
      path: '/Buycar',
      name: 'Buycar',
      component: Buycar
    },{
      path: '/Newslist',
      name: 'Newslist',
      component: Newslist
    },{
      path: "/Index/Newsinfo:id",
      name: 'Newsinfo',
      component: Newsinfo
    },{
      path: "/Pic",
      name: 'Pic',
      component: Pic
    },{
      path: "/Goods",
      name: 'Goods',
      component: Goods
    },
    {
      path: "/home/Goodsinfo:id",
      name: 'Goodsinfo',
      component: Goodsinfo
    }
  ]
})
